package o;

import android.net.Uri;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import com.huawei.appmarket.service.distribution.deeplink.fulldetail.DisFullDetailActivityProtocol;
import com.huawei.appmarket.service.distribution.minidetail.MiniDetailActivityProtocol;
import com.huawei.appmarket.service.distribution.minidetail.MiniDetailActivityProtocol.Request;
import com.huawei.hms.framework.common.ContainerUtils;

public class dxk {
    @NonNull
    public static cjm ॱ(@NonNull Uri uri, String str, String str2) {
        Object ˏ = ceb.ˏ(uri, "accessID");
        String ˏ2 = ceb.ˏ(uri, "s");
        String ˏ3 = ceb.ˏ(uri, "id");
        Object ˏ4 = ceb.ˏ(uri, "referrer");
        String ˏ5 = ceb.ˏ(uri, "channelId");
        cjo miniDetailActivityProtocol = new MiniDetailActivityProtocol();
        Request request = new Request();
        request.ʽॱ(str);
        if (!TextUtils.isEmpty(ˏ)) {
            request.ʽ(ˏ);
        }
        request.ʿ(ˏ2);
        request.ˈ(ˏ3);
        if (!TextUtils.isEmpty(ˏ4)) {
            request.ॱˊ(ˋ(ˏ4));
        }
        request.ʼॱ(ˏ5);
        request.ॱˋ(str2);
        miniDetailActivityProtocol.ˋ(request);
        return new cjm("mini.detail", miniDetailActivityProtocol);
    }

    @NonNull
    public static cjm ˋ(@NonNull Uri uri, String str, String str2) {
        Object ˏ = ceb.ˏ(uri, "accessID");
        String ˏ2 = ceb.ˏ(uri, "s");
        String ˏ3 = ceb.ˏ(uri, "id");
        Object ˏ4 = ceb.ˏ(uri, "referrer");
        String ˏ5 = ceb.ˏ(uri, "channelId");
        cjo disFullDetailActivityProtocol = new DisFullDetailActivityProtocol();
        DisFullDetailActivityProtocol.Request request = new DisFullDetailActivityProtocol.Request();
        request.ˋ(drj.ˏ(str));
        request.ॱˋ(str);
        if (!TextUtils.isEmpty(ˏ)) {
            request.ʽ(ˏ);
        }
        request.ᐝॱ(ˏ2);
        request.ʾ(ˏ3);
        if (!TextUtils.isEmpty(ˏ4)) {
            request.ॱˊ(ˋ(ˏ4));
        }
        request.ʽॱ(ˏ5);
        request.ʿ(str2);
        disFullDetailActivityProtocol.ˋ(request);
        return new cjm("distribution.fulldetail.activity", disFullDetailActivityProtocol);
    }

    private static String ˋ(String str) {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append("referrer").append(ContainerUtils.KEY_VALUE_DELIMITER).append(dof.ˎ(str));
        return stringBuilder.toString();
    }
}
